import React from 'react';
import Item, { IFormItemProps } from './Item'
import Switch, { SwitchProps } from 'antd/lib/switch';
interface ISwitchProps extends SwitchProps, IFormItemProps { }

export default class FormSwitch extends React.Component<ISwitchProps> {
	render() {
		let fieldDecoratorOptions = { valuePropName: 'checked' }
		return (
			<Item
				{...this.props}
				fieldDecoratorOptions={fieldDecoratorOptions}
				render={() => (<Switch />)}
			/>)


	}
}